package dev.marsh.hunter

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent

/**
 * Check settings receiver
 *
 * @author zhaozhe
 * Created on 2018/7/14.
 */
class CheckSettingReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {
        intent?.let {
            if (it.action == "android.intent.action.BOOT_COMPLETED") {
                context?.let {
                    if (!checkSettings(it)) {
                        goSettings(it)
                    }
                }
            }
        }
    }
}